import request from '@/utils/request'

/**
 * 分页查询模版信息
 * @param params
 * @returns {*}
 */
export function queryAllNoticeTemplate(params) {
  return request({
    url: 'rest/api/manager/v1/webhook/pager',
    method: 'get',
    params: params
  })
}

export function queryAllNoticeConstant() {
  return request({
    url: 'rest/api/manager/v1/webhook/constant',
    method: 'get'
  })
}

/**
 * 删除模版
 * @param data
 * @returns {*}
 */
export function deleteTemplate(data) {
  return request({
    url: 'rest/api/manager/v1/webhook/del',
    method: 'post',
    data: data
  })
}

export function saveEntity(data) {
  return request({
    url: 'rest/api/manager/v1/webhook/save/entity',
    method: 'post',
    data: data
  })
}

export function updateEntity(data) {
  return request({
    url: 'rest/api/manager/v1/webhook/update/entity',
    method: 'post',
    data: data
  })
}
